<?php
/**
 * Convert from JS to PHP
 * http://s01.volamweb.zing.vn/ajaxpro/core.ashx
 * http://s01.volamweb.zing.vn/ajaxpro/Main,App_Web_tj4zv1pu.ashx
 */

function ajax_action($action,$param = array()) {
  global $JXWA;
  $header = array(
    "X-AjaxPro-Method" => $action,
    "Referer" => $JXWA->url['main'],
    "Cookie" => $JXWA->cookie,
  );
  $params = array();
  foreach ($param as $key => $value) {
    $params[] = '"'. $key .'":'. Tools::encode($value);
  }
  $request_str = implode(",",$params);
  $request_str = '{'.$request_str.'}';
  //addLog('AjaxPro '.$action. ' '.$request_str, 2);
  $ret = drupal_http_request($JXWA->url['ajax'], $header, 'POST', $request_str);
  //addLog('return AjaxPro '.$ret->data);
  return $ret;
}
//Ajax function
function ajax_GetPageInfo() {
  return ajax_action("GetPageInfo", array());
}
function ajax_SetPageInfo($cityNum, $pageNum) {
  return ajax_action("SetPageInfo", array("cityNum" => $cityNum, "pageNum" => $pageNum));
}
function ajax_GetUserInfo() {
  return ajax_action("GetUserInfo", array());
}
function ajax_GetServerInfo() {
  return ajax_action("GetServerInfo", array());
}
function ajax_GetCityInteriorInfo($cityID) {
  return ajax_action("GetCityInteriorInfo", array("cityID" => $cityID));
}
function ajax_GetMapUnitInfo($cityID, $unitType, $pos) {
  return ajax_action("GetMapUnitInfo", array("cityID" => $cityID, "unitType" => $unitType, "pos" => $pos));
}
function ajax_GetBuildingByPos($cityID, $buildingType, $pos) {
  return ajax_action("GetBuildingByPos", array("cityID" => $cityID, "buildingType" => $buildingType, "pos" => $pos));
}
function ajax_GetBuildingByID($cityID, $buildingType, $buildingID) {
  return ajax_action("GetBuildingByID", array("cityID" => $cityID, "buildingType" => $buildingType, "buildingID" => $buildingID));
}
function ajax_GetTechnicByBuilding($cityID, $buildingIndex) {
  return ajax_action("GetTechnicByBuilding", array("cityID" => $cityID, "buildingIndex" => $buildingIndex));
}
function ajax_GetValidEvent($cityID) {
  return ajax_action("GetValidEvent", array("cityID" => $cityID));
}
function ajax_DeleteEvent($cityID, $eventID) {
  return ajax_action("DeleteEvent", array("cityID" => $cityID, "eventID" => $eventID));
}
function ajax_AddBuildingEvent($cityID, $actionType, $objType, $objID, $pos) {
  return ajax_action("AddBuildingEvent", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "pos" => $pos));
}
function ajax_AddVisitEvent($cityID, $actionType, $objType, $objID, $pos, $goldFlag) {
  return ajax_action("AddVisitEvent", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "pos" => $pos, "goldFlag" => $goldFlag));
}
function ajax_ProcessOverdueEvent($cityID, $eventID) {
  return ajax_action("ProcessOverdueEvent", array("cityID" => $cityID, "eventID" => $eventID));
}
function ajax_GetCanEenageHero($cityID, $union) {
  return ajax_action("GetCanEenageHero", array("cityID" => $cityID, "union" => $union));
}
function ajax_FireCanEenageHero($cityID, $heroID) {
  return ajax_action("FireCanEenageHero", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_EngageHero($cityID, $heroID) {
  return ajax_action("EngageHero", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_GetDefenceLandform($cityID) {
  return ajax_action("GetDefenceLandform", array("cityID" => $cityID));
}
function ajax_GetDefencePosHero($cityID) {
  return ajax_action("GetDefencePosHero", array("cityID" => $cityID));
}
function ajax_SetHeroDefence($cityID, $heroID, $pos) {
  return ajax_action("SetHeroDefence", array("cityID" => $cityID, "heroID" => $heroID, "pos" => $pos));
}
function ajax_CancelHeroDefence($cityID, $heroID) {
  return ajax_action("CancelHeroDefence", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_GetCityHero($cityID) {
  return ajax_action("GetCityHero", array("cityID" => $cityID));
}
function ajax_GetHeroBySkillLevel($cityID, $level) {
  return ajax_action("GetHeroBySkillLevel", array("cityID" => $cityID, "level" => $level));
}
function ajax_GetHeroByID($cityID, $heroID) {
  return ajax_action("GetHeroByID", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_GetItemCanUse($cityID, $type, $heroLevel, $heroSex, $heroUnion, $page) {
  return ajax_action("GetItemCanUse", array("cityID" => $cityID, "type" => $type, "heroLevel" => $heroLevel, "heroSex" => $heroSex, "heroUnion" => $heroUnion, "page" => $page));
}
function ajax_ChangeHeroListType($cityID, $heroID, $listType) {
  return ajax_action("ChangeHeroListType", array("cityID" => $cityID, "heroID" => $heroID, "listType" => $listType));
}
function ajax_FireTheHero($cityID, $heroID) {
  return ajax_action("FireTheHero", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_AddHeroEvent($cityID, $actionType, $objType, $objID, $subjoin) {
  return ajax_action("AddHeroEvent", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "subjoin" => $subjoin));
}
function ajax_AddHeroEventEx($cityID, $actionType, $objType, $objID, $subjoin, $flag) {
  return ajax_action("AddHeroEventEx", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "subjoin" => $subjoin, "flag" => $flag));
}
function ajax_AddDailyTaskEvent($cityID) {
  return ajax_action("AddDailyTaskEvent", array("cityID" => $cityID));
}
function ajax_AddComposeTaskEvent($cityID) {
  return ajax_action("AddComposeTaskEvent", array("cityID" => $cityID));
}
function ajax_QuickGetComposeTask($cityID) {
  return ajax_action("QuickGetComposeTask", array("cityID" => $cityID));
}
function ajax_DebusHeroEquip($cityID, $heroID) {
  return ajax_action("DebusHeroEquip", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_AddCorpsEventExtend($cityID,$target,$objID = 0, $objType = 5, $actionType = 11, $flag = "[0,0,0,0,0,0,0,0,0,0]") {
  return ajax_action("AddCorpsEventExtend", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "target" => $target, "flag" => $flag));
}
function ajax_AddCorpsEvent($cityID, $actionType, $objType, $objID, $target) {
  return ajax_action("AddCorpsEvent", array("cityID" => $cityID, "actionType" => $actionType, "objType" => $objType, "objID" => $objID, "target" => $target));
}
function ajax_GetCityCorps($cityID) {
  return ajax_action("GetCityCorps", array("cityID" => $cityID));
}
function ajax_GetCityOtherCorps($cityID) {
  return ajax_action("GetCityOtherCorps", array("cityID" => $cityID));
}
function ajax_GetCityCropsState($cityID) {
  return ajax_action("GetCityCropsState", array("cityID" => $cityID));
}
function ajax_GetCorpsHero($cropsID) {
  return ajax_action("GetCorpsHero", array("cropsID" => $cropsID));
}
function ajax_GetItemNum($cityID, $type) {
  return ajax_action("GetItemNum", array("cityID" => $cityID, "type" => $type));
}
function ajax_GetItemByType($cityID, $type, $page, $orderBy, $orderType) {
  return ajax_action("GetItemByType", array("cityID" => $cityID, "type" => $type, "page" => $page, "orderBy" => $orderBy, "orderType" => $orderType));
}
function ajax_GetCanUseHero($cityID, $level, $sex, $junta) {
  return ajax_action("GetCanUseHero", array("cityID" => $cityID, "level" => $level, "sex" => $sex, "junta" => $junta));
}
function ajax_GetSimpleCropsHeros($CorpsID) {
  return ajax_action("GetSimpleCropsHeros", array("CorpsID" => $CorpsID));
}
function ajax_TakeItem($cityID, $itemID, $heroID) {
  return ajax_action("TakeItem", array("cityID" => $cityID, "itemID" => $itemID, "heroID" => $heroID));
}
function ajax_UseItemHeroExp($cityID, $itemID, $heroID) {
  return ajax_action("UseItemHeroExp", array("cityID" => $cityID, "itemID" => $itemID, "heroID" => $heroID));
}
function ajax_UserItemSkillEXP($cityID, $heroID, $itemID) {
  return ajax_action("UserItemSkillEXP", array("cityID" => $cityID, "heroID" => $heroID, "itemID" => $itemID));
}
function ajax_UserItemChangeSkill($cityID, $heroID, $itemID) {
  return ajax_action("UserItemChangeSkill", array("cityID" => $cityID, "heroID" => $heroID, "itemID" => $itemID));
}
function ajax_UserItemUpSkill($cityID, $heroID, $itemID) {
  return ajax_action("UserItemUpSkill", array("cityID" => $cityID, "heroID" => $heroID, "itemID" => $itemID));
}
function ajax_UseItemRes($cityID, $itemID) {
  return ajax_action("UseItemRes", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_UseItem($cityID, $itemID) {
  return ajax_action("UseItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_UseFeastItem($cityID, $itemID) {
  return ajax_action("UseFeastItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_SellItem($cityID, $itemID, $price) {
  return ajax_action("SellItem", array("cityID" => $cityID, "itemID" => $itemID, "price" => $price));
}
function ajax_RepairItem($cityID, $itemID) {
  return ajax_action("RepairItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_RepairItemGeneral($cityID, $itemID) {
  return ajax_action("RepairItemGeneral", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_DonateItem($cityID, $itemID) {
  return ajax_action("DonateItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_DisassembleItem($cityID, $itemID, $index) {
  return ajax_action("DisassembleItem", array("cityID" => $cityID, "itemID" => $itemID, "index" => $index));
}
function ajax_CancleSellItem($cityID, $itemID) {
  return ajax_action("CancleSellItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_DebusItem($cityID, $itemID) {
  return ajax_action("DebusItem", array("cityID" => $cityID, "itemID" => $itemID));
}
function ajax_GetSellItemNum($type) {
  return ajax_action("GetSellItemNum", array("type" => $type));
}
function ajax_GetSellItemNumByItemName($type, $itemName) {
  return ajax_action("GetSellItemNumByItemName", array("type" => $type, "itemName" => $itemName));
}
function ajax_GetSellItemByType($type, $page, $orderBy, $orderType) {
  return ajax_action("GetSellItemByType", array("type" => $type, "page" => $page, "orderBy" => $orderBy, "orderType" => $orderType));
}
function ajax_GetSellItemByItemName($type, $page, $itemName, $orderBy, $orderType) {
  return ajax_action("GetSellItemByItemName", array("type" => $type, "page" => $page, "itemName" => $itemName, "orderBy" => $orderBy, "orderType" => $orderType));
}
function ajax_BuyItem($cityID, $itemID, $price) {
  return ajax_action("BuyItem", array("cityID" => $cityID, "itemID" => $itemID, "price" => $price));
}
function ajax_GetWorldLandform($cityID, $pos) {
  return ajax_action("GetWorldLandform", array("cityID" => $cityID, "pos" => $pos));
}
function ajax_GetNewMailNum() {
  return ajax_action("GetNewMailNum", array());
}
function ajax_GetMailNum($type) {
  return ajax_action("GetMailNum", array("type" => $type));
}
function ajax_GetNewMail($page) {
  return ajax_action("GetNewMail", array("page" => $page));
}
function ajax_GetMailByType($type, $page) {
  return ajax_action("GetMailByType", array("type" => $type, "page" => $page));
}
function ajax_AddnewMail($toUser, $title, $text, $type) {
  return ajax_action("AddnewMail", array("toUser" => $toUser, "title" => $title, "text" => $text, "type" => $type));
}
function ajax_DeleteMails($mails) {
  return ajax_action("DeleteMails", array("mails" => $mails));
}
function ajax_GetMailByID($ID) {
  return ajax_action("GetMailByID", array("id" => $ID));
}
function ajax_GetFightMailByID($ID) {
  return ajax_action("GetFightMailByID", array("id" => $ID));
}
function ajax_GetCityNameByPos($pos) {
  return ajax_action("GetCityNameByPos", array("pos" => $pos));
}
function ajax_GetCorpsPos($cityID) {
  return ajax_action("GetCorpsPos", array("cityID" => $cityID));
}
function ajax_ReturnCorps($corpsID) {
  return ajax_action("ReturnCorps", array("corpsID" => $corpsID));
}
function ajax_CallCorpsBack($cityID) {
  return ajax_action("CallCorpsBack", array("cityID" => $cityID));
}
function ajax_OverEventHandle($cityID) {
  return ajax_action("OverEventHandle", array("cityID" => $cityID));
}
function ajax_HeroFastHealth($cityID, $heroID) {
  return ajax_action("HeroFastHealth", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_GetWorldPosState($cityID, $pos) {
  return ajax_action("GetWorldPosState", array("cityID" => $cityID, "pos" => $pos));
}
function ajax_GetArena($pos) {
  return ajax_action("GetArena", array("pos" => $pos));
}
function ajax_GetArenaTimes() {
  return ajax_action("GetArenaTimes", array());
}
function ajax_GetNameState($userName) {
  return ajax_action("GetNameState", array("userName" => $userName));
}
function ajax_GetDefenceNum($cityID) {
  return ajax_action("GetDefenceNum", array("cityID" => $cityID));
}
function ajax_GetTask($cityID) {
  return ajax_action("GetTask", array("cityID" => $cityID));
}
function ajax_GetOtherTask($cityID, $type) {
  return ajax_action("GetOtherTask", array("cityID" => $cityID, "type" => $type));
}
function ajax_GetHeChengTask($cityID) {
  return ajax_action("GetHeChengTask", array("cityID" => $cityID));
}
function ajax_GetResExchangeMission($cityID) {
  return ajax_action("GetResExchangeMission", array("cityID" => $cityID));
}
function ajax_GetFeastDayMission($cityID) {
  return ajax_action("GetFeastDayMission", array("cityID" => $cityID));
}
function ajax_GetTaskGoods($cityID, $ID) {
  return ajax_action("GetTaskGoods", array("cityID" => $cityID, "ID" => $ID));
}
function ajax_GetOtherTaskGoods($cityID, $ID) {
  return ajax_action("GetOtherTaskGoods", array("cityID" => $cityID, "ID" => $ID));
}
function ajax_GetHeChengGoods($cityID, $ID) {
  return ajax_action("GetHeChengGoods", array("cityID" => $cityID, "ID" => $ID));
}
function ajax_ResExchangeMissionPrize($cityID, $ID) {
  return ajax_action("ResExchangeMissionPrize", array("cityID" => $cityID, "ID" => $ID));
}
function ajax_FeastDayMissionPrize($cityID, $ID) {
  return ajax_action("FeastDayMissionPrize", array("cityID" => $cityID, "ID" => $ID));
}
function ajax_DeleteTask($ID) {
  return ajax_action("DeleteTask", array("ID" => $ID));
}
function ajax_GetCropsNeedTime($cityID, $tPos) {
  return ajax_action("GetCropsNeedTime", array("cityID" => $cityID, "tPos" => $tPos));
}
function ajax_GetPersistEffectGroup($cityID) {
  return ajax_action("GetPersistEffectGroup", array("cityID" => $cityID));
}
function ajax_GetOverEffectArray() {
  return ajax_action("GetOverEffectArray", array());
}
function ajax_GetVipThirtyDays($cityID) {
  return ajax_action("GetVipThirtyDays", array("cityID" => $cityID));
}
function ajax_GetVipSevenDays($cityID) {
  return ajax_action("GetVipSevenDays", array("cityID" => $cityID));
}
function ajax_GetPeaceSevenDays($cityID) {
  return ajax_action("GetPeaceSevenDays", array("cityID" => $cityID));
}
function ajax_GetPeaceTwoDays($cityID) {
  return ajax_action("GetPeaceTwoDays", array("cityID" => $cityID));
}
function ajax_GetPeaceEightHours($cityID) {
  return ajax_action("GetPeaceEightHours", array("cityID" => $cityID));
}
function ajax_GetConvokeItem($cityID) {
  return ajax_action("GetConvokeItem", array("cityID" => $cityID));
}
function ajax_GetAccountant($cityID) {
  return ajax_action("GetAccountant", array("cityID" => $cityID));
}
function ajax_GetGrangerItem($cityID) {
  return ajax_action("GetGrangerItem", array("cityID" => $cityID));
}
function ajax_GetExpPer($cityID) {
  return ajax_action("GetExpPer", array("cityID" => $cityID));
}
function ajax_GetFastMove($cityID) {
  return ajax_action("GetFastMove", array("cityID" => $cityID));
}
function ajax_GetPerSistEffectFlags($userName) {
  return ajax_action("GetPerSistEffectFlags", array("userName" => $userName));
}
function ajax_GetDefenceNpcCorps($pos) {
  return ajax_action("GetDefenceNpcCorps", array("pos" => $pos));
}
function ajax_GetMapInfoByPos($pos) {
  return ajax_action("GetMapInfoByPos", array("pos" => $pos));
}
function ajax_GetVersionInfo() {
  return ajax_action("GetVersionInfo", array());
}
function ajax_GetPlayerNum() {
  return ajax_action("GetPlayerNum", array());
}
function ajax_GetInsPlayerNum() {
  return ajax_action("GetInsPlayerNum", array());
}
function ajax_GetHeroCount() {
  return ajax_action("GetHeroCount", array());
}
function ajax_GetUserRankByPage($pageNum, $pageSize) {
  return ajax_action("GetUserRankByPage", array("pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_GetHeroRankByPage($pageNum, $pageSize) {
  return ajax_action("GetHeroRankByPage", array("pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_GetInsigniaRankByPage($pageNum, $pageSize) {
  return ajax_action("GetInsigniaRankByPage", array("pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_GetUserRankByUserName($userName) {
  return ajax_action("GetUserRankByUserName", array("userName" => $userName));
}
function ajax_GetUserSub($userName) {
  return ajax_action("GetUserSub", array("userName" => $userName));
}
function ajax_CreateOrg($cityID, $org_name, $org_intro) {
  return ajax_action("CreateOrg", array("cityID" => $cityID, "org_name" => $org_name, "org_intro" => $org_intro));
}
function ajax_GetMyOrgnizeInfo() {
  return ajax_action("GetMyOrgnizeInfo", array());
}
function ajax_GetOrganizeList($word, $pageNum, $pageSize) {
  return ajax_action("GetOrganizeList", array("word" => $word, "pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_GetMemberShipList($orgname, $state, $pageNum, $pageSize) {
  return ajax_action("GetMemberShipList", array("orgName" => $orgname, "state" => $state, "pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_ApplyJoinUnion($cityID, $orgname) {
  return ajax_action("ApplyJoinUnion", array("cityID" => $cityID, "orgname" => $orgname));
}
function ajax_QuitOrganize($orgname) {
  return ajax_action("QuitOrganize", array("orgname" => $orgname));
}
function ajax_ModifyOrgIntro($orgname, $intro) {
  return ajax_action("ModifyOrgIntro", array("orgname" => $orgname, "intro" => $intro));
}
function ajax_ModifyOrgAffiche($orgname, $affiche) {
  return ajax_action("ModifyOrgAffiche", array("orgname" => $orgname, "affiche" => $affiche));
}
function ajax_GetOrgInfo($orgname) {
  return ajax_action("GetOrgInfo", array("orgname" => $orgname));
}
function ajax_BossFunc($orgname, $type, $to_username) {
  return ajax_action("BossFunc", array("orgname" => $orgname, "type" => $type, "to_username" => $to_username));
}
function ajax_SendMessage($junta, $message) {
  return ajax_action("SendMessage", array("junta" => $junta, "message" => $message));
}
function ajax_AddServerChatWords($message) {
  return ajax_action("AddServerChatWords", array("message" => $message));
}
function ajax_ListMessage($num) {
  return ajax_action("ListMessage", array("num" => $num));
}
function ajax_GetserverChatWords($num) {
  return ajax_action("GetserverChatWords", array("num" => $num));
}
function ajax_UpdateBackImage($cityID, $num) {
  return ajax_action("UpdateBackImage", array("cityID" => $cityID, "num" => $num));
}
function ajax_ForceEffectOverdue($cityID, $mainType) {
  return ajax_action("ForceEffectOverdue", array("cityID" => $cityID, "mainType" => $mainType));
}
function ajax_ForceNewUserOverdue() {
  return ajax_action("ForceNewUserOverdue", array());
}
function ajax_GoldBuyRes($cityID, $type, $num) {
  return ajax_action("GoldBuyRes", array("cityID" => $cityID, "type" => $type, "num" => $num));
}
function ajax_GetOrgNode($org, $num) {
  return ajax_action("GetOrgNode", array("org" => $org, "num" => $num));
}
function ajax_Promotion($bossName, $orgname, $deputyName) {
  return ajax_action("Promotion", array("bossName" => $bossName, "orgName" => $orgname, "deputyName" => $deputyName));
}
function ajax_Demotion($bossName, $orgname, $deputyName) {
  return ajax_action("Demotion", array("bossName" => $bossName, "orgName" => $orgname, "deputyName" => $deputyName));
}
function ajax_DisbandOrg($orgname) {
  return ajax_action("DisbandOrg", array("orgName" => $orgname));
}
function ajax_UpdateUserOnline() {
  return ajax_action("UpdateUserOnline", array());
}
function ajax_GetServerTimeNow() {
  return ajax_action("GetServerTimeNow", array());
}
function ajax_GetMemberShipCountByState($orgname, $state) {
  return ajax_action("GetMemberShipCountByState", array("orgName" => $orgname, "state" => $state));
}
function ajax_GetMemberShipCountByStateOther($orgname, $state) {
  return ajax_action("GetMemberShipCountByStateOther", array("orgName" => $orgname, "state" => $state));
}
function ajax_GetOrganizeCount() {
  return ajax_action("GetOrganizeCount", array());
}
function ajax_Abdication($orgname, $haeresName) {
  return ajax_action("Abdication", array("orgName" => $orgname, "haeresName" => $haeresName));
}
function ajax_GetMyOrgResInfo() {
  return ajax_action("GetMyOrgResInfo", array());
}
function ajax_GetSDUserPrestige($prestigeLevel) {
  return ajax_action("GetSDUserPrestige", array("prestigeLevel" => $prestigeLevel));
}
function ajax_GetSDUserFame($fameLevel) {
  return ajax_action("GetSDUserFame", array("fameLevel" => $fameLevel));
}
function ajax_GetDBOrgResource($orgname) {
  return ajax_action("GetDBOrgResource", array("orgname" => $orgname));
}
function ajax_GetSDOrgEffectByLevel($orglevel) {
  return ajax_action("GetSDOrgEffectByLevel", array("orglevel" => $orglevel));
}
function ajax_GetHeroAutoExpBreak($cityID, $heroID) {
  return ajax_action("GetHeroAutoExpBreak", array("cityID" => $cityID, "heroID" => $heroID));
}
function ajax_GetOrgMembersRes($orgname, $pageNum, $pageSize) {
  return ajax_action("GetOrgMembersRes", array("orgName" => $orgname, "pageNum" => $pageNum, "pageSize" => $pageSize));
}
function ajax_UpgradeFameLevel() {
  return ajax_action("UpgradeFameLevel", array());
}
function ajax_UpgradePrestigeLevel() {
  return ajax_action("UpgradePrestigeLevel", array());
}
function ajax_ContributeRes($orgname, $resID, $resNum) {
  return ajax_action("ContributeRes", array("orgName" => $orgname, "resID" => $resID, "resNum" => $resNum));
}
function ajax_ResToGoldRateOfExchange($resID) {
  return ajax_action("ResToGoldRateOfExchange", array("resID" => $resID));
}
function ajax_BuyOrgRes($resID, $resNum) {
  return ajax_action("BuyOrgRes", array("resID" => $resID, "resNum" => $resNum));
}
function ajax_OrganizeUpgrade($orgname) {
  return ajax_action("OrganizeUpgrade", array("orgName" => $orgname));
}
function ajax_Exit() {
  return ajax_action("Exit", array());
}
function ajax_KickUser() {
  return ajax_action("KickUser", array());
}
function ajax_UpdateHeroName($cityID, $heroID, $heroName) {
  return ajax_action("UpdateHeroName", array("cityID" => $cityID, "heroID" => $heroID, "heroName" => $heroName));
}
function ajax_UpdateCityName($cityID, $cityName) {
  return ajax_action("UpdateCityName", array("cityID" => $cityID, "cityName" => $cityName));
}
function ajax_GetUserHeros($npcPos) {
  return ajax_action("GetUserHeros", array("npcPos" => $npcPos));
}
function ajax_GetOtherTaskSimple($cityID, $type) {
  return ajax_action("GetOtherTaskSimple", array("cityID" => $cityID, "type" => $type));
}
function ajax_GetHeChengTaskSimple($cityID) {
  return ajax_action("GetHeChengTaskSimple", array("cityID" => $cityID));
}
function ajax_GetResExchangeMissionSimple($cityID) {
  return ajax_action("GetResExchangeMissionSimple", array("cityID" => $cityID));
}
function ajax_GetFeastDayMissionSimple($cityID) {
  return ajax_action("GetFeastDayMissionSimple", array("cityID" => $cityID));
}
function ajax_GetOtherTaskByType($cityID, $type, $subType) {
  return ajax_action("GetOtherTaskByType", array("cityID" => $cityID, "type" => $type, "subType" => $subType));
}
function ajax_GetHeChengTaskByType($cityID, $subType) {
  return ajax_action("GetHeChengTaskByType", array("cityID" => $cityID, "subType" => $subType));
}
function ajax_GetResExchangeMissionByType($cityID, $subType) {
  return ajax_action("GetResExchangeMissionByType", array("cityID" => $cityID, "subType" => $subType));
}
function ajax_GetFeastDayMissionByType($cityID, $subType) {
  return ajax_action("GetFeastDayMissionByType", array("cityID" => $cityID, "subType" => $subType));
}
function ajax_AddSearchEvent($cityID, $pos) {
  return ajax_action("AddSearchEvent", array("cityID" => $cityID, "pos" => $pos));
}